﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Communications.Configuration
{
    /// <summary>
    /// 
    /// </summary>
    /// <seealso cref="System.Configuration.ConfigurationElement" />
    public class EmailItem : ConfigurationElement
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="EmailItem"/> class.
        /// </summary>
        public EmailItem()
        {

        }

        /// <summary>
        /// Gets or sets the key.
        /// </summary>
        /// <value>
        /// The key.
        /// </value>
        [ConfigurationProperty("key", IsRequired = true, IsKey = true)]
        public int Key
        {
            get { return (int)this["key"]; }
            set { this["key"] = value; }
        }

        /// <summary>
        /// Gets or sets the email.
        /// </summary>
        /// <value>
        /// The email.
        /// </value>
        [ConfigurationProperty("email", IsRequired = true, IsKey = false)]
        public string Email
        {
            get { return (string)this["email"]; }
            set { this["email"] = value; }
        }
    }
}
